﻿<%
Response.Charset="utf-8"
'判断是否登录或登录超时===============================================================
dim AdminAction
AdminAction=request.QueryString("AdminAction")
select case AdminAction
  case "Out"
    call OutLogin()
  case else
    call Login()
end select
'========
sub Login()
'cookie验证
 ' if request.cookies("Martech_com")("adminname")="" or request.cookies("Martech_com")("AdminPurview")="" or request.cookies("Martech_com")("ip")="" or request.cookies("Martech_com")("UserName")="" then

   '  response.end
	'end if
	
	' session验证
  if session("AdminName")="" or session("UserName")="" or session("AdminPurview")="" or session("LoginSystem")<>"Succeed" then
     response.write "您还没有登录或登录已超时，请<a href='index.asp' target='_parent'><font color='red'>返回登录</font></a>!"
     response.end
  end if
 
end sub
'========
sub OutLogin()
'cookies验证
   response.cookies("Martech_com")("adminname")=""
   response.cookies("Martech_com")("UserName")=""
   response.cookies("Martech_com")("AdminPurview")=""
   response.cookies("Martech_com")("LoginSystem")=""
   response.cookies("Martech_com")("ip")=""

'session验证
  'session.contents.remove "AdminName"
  'session.contents.remove "UserName"
  'session.contents.remove "AdminPurview"
  'session.contents.remove "LoginSystem"
  'session.contents.remove "VerifyCode"
  response.write "<script language=javascript>top.location.replace('index.asp');</script>"
end sub
%>